Popular Searches
Popular Course Categories
Popular Courses

Addressing, Partitioning, and Compute Using

Addressing, Partitioning, and Compute Using

Table Calculations and Aggregations

Addressing, Partitioning, and Compute Using in Tableau

Topic: Table Calculations, Addressing Fields, Partitioning Fields, Compute Using Options, and Practical Applications

Learning Objectives: Understand how Tableau performs table calculations, identify addressing and partitioning dimensions, configure Compute Using settings, troubleshoot incorrect results, and build practical analytical reports.

Course Link: JustAcademy Tableau Training

Demo Link: Register for a Tableau Course Demo


1. Introduction to Table Calculations

Table calculations in Tableau transform values displayed in a visualization. They are calculated using the marks available in the current view and can perform operations such as running totals, rankings, percentage of total, moving averages, differences, and index calculations.

Unlike calculations that operate directly at the data source level, table calculations depend on the structure and arrangement of the visualization. The dimensions in a worksheet determine how Tableau organizes the marks and how a table calculation can move through them.

Three important concepts control table calculations:

  • Addressing: Determines the direction or dimensions along which the calculation is performed.
  • Partitioning: Determines the groups in which the calculation is performed separately.
  • Compute Using: Specifies how Tableau uses the dimensions in the view to determine the calculation's direction and scope.

Simple Example

Suppose a company wants to calculate monthly sales and running sales totals for each year. Tableau must know whether to add sales across months, whether to restart the total for each year, and which dimensions define the calculation.

Year Month Sales Running Total
2025 January 10,000 10,000
2025 February 15,000 25,000
2025 March 20,000 45,000
2026 January 12,000 12,000
2026 February 18,000 30,000

In this example, the calculation moves across the months within each year. The year acts as a partition, so the running total restarts when the year changes.

2. What Is Addressing in Tableau?

Addressing defines the dimensions along which Tableau performs a table calculation. It determines the direction in which Tableau moves through marks to calculate a result.

For example, if a worksheet contains Month on Rows and Sales on Text, addressing by Month means Tableau performs the calculation through the sequence of months.

Example of Addressing

Month Sales Running Total
January 10,000 10,000
February 15,000 25,000
March 20,000 45,000
April 25,000 70,000

The running total is calculated by moving through the months in sequence. Month is the addressing dimension.

Common Addressing Dimensions

  • Month or Year for time-based calculations.
  • Product Name for product rankings.
  • Customer Name for customer rankings.
  • Region for calculations across regions.
  • Category or Sub-Category for category comparisons.

Important Points About Addressing

  • Addressing determines the direction in which a table calculation traverses marks.
  • The addressing dimension may correspond to rows, columns, or another arrangement in the view.
  • Changing the addressing dimension can change the calculation results.
  • Sorting can change the sequence of marks and therefore affect order-dependent calculations.
  • Addressing is especially important for running totals, differences, ranks, and index calculations.

3. What Is Partitioning in Tableau?

Partitioning defines the groups in which Tableau performs a table calculation separately. Each partition acts as an independent section of the view. Depending on the calculation, results may restart at the beginning of each partition.

For example, if monthly sales are displayed separately for each region, Tableau can calculate a running total independently for every region.

Example of Partitioning by Region

Region Month Sales Regional Running Total
East January 10,000 10,000
East February 15,000 25,000
East March 20,000 45,000
West January 12,000 12,000
West February 18,000 30,000
West March 22,000 52,000

Here, Month is the addressing dimension and Region is the partitioning dimension. Tableau calculates the running total across months and restarts the calculation for the West region after completing the East region.

Common Partitioning Dimensions

  • Region: Calculate independently for each region.
  • Category: Calculate separately for each product category.
  • Year: Restart calculations for each year.
  • Department: Calculate independently for each department.
  • Customer Segment: Perform calculations separately for each customer segment.

Important Points About Partitioning

  • Partitioning determines the scope or group of marks used by a table calculation.
  • A table calculation is evaluated separately within each partition.
  • Calculations such as running totals and index values can restart when a new partition begins.
  • Changing partitioning may change rankings, totals, percentages, and other calculated values.
  • Dimensions in the view must be assigned appropriately as addressing or partitioning fields for the table calculation.

4. Difference Between Addressing and Partitioning

Feature Addressing Partitioning
Meaning Defines the direction of calculation. Defines the scope or groups of calculation.
Main question Across which dimension should Tableau calculate? Within which groups should Tableau calculate separately?
Purpose Determines how Tableau moves through marks. Determines where a calculation starts a new group.
Example Calculate a running total across months. Restart the running total for each region.
Typical dimensions Month, Product, Customer. Region, Year, Category.
Effect on INDEX() Determines the sequence of marks being numbered. Determines where index numbering restarts.
Effect on RANK() Determines which marks are ranked along the calculation. Determines the groups ranked separately.

Easy Way to Remember

Addressing = Direction. It answers, "Which way should the calculation move?"

Partitioning = Group. It answers, "Within which group should the calculation operate?"

Compute Using = Configuration. It helps specify how Tableau uses the dimensions to determine the direction and scope of the calculation.

5. What Is Compute Using in Tableau?

Compute Using is a table calculation setting that determines how Tableau traverses the dimensions in a visualization. It helps control which dimensions are used for addressing and which dimensions form separate partitions.

Tableau provides predefined options, such as Table (Across), Table (Down), Pane (Across), Pane (Down), and Specific Dimensions. The available behavior depends on the structure of the worksheet.

Why Is Compute Using Important?

  • It controls the direction of running totals and difference calculations.
  • It determines how ranks are assigned to marks.
  • It controls whether index values restart for different groups.
  • It helps calculate percentages across a table or within individual sections.
  • It helps prevent incorrect results when a worksheet contains several dimensions.

6. Common Compute Using Options

6.1 Table (Across)

Table (Across) calculates across the table horizontally and restarts after each partition.

Example: A table has years across columns. Tableau calculates a running total from left to right across the years.

Product 2024 Sales 2025 Sales 2026 Sales
Laptop 10,000 15,000 20,000
Mobile 5,000 8,000 12,000

If the running total is computed across each product row, Laptop's running totals become 10,000, 25,000, and 45,000. The calculation restarts for Mobile.

6.2 Table (Down)

Table (Down) calculates vertically from top to bottom and restarts after each partition.

Example: A table has products listed in rows. Tableau calculates the running total down the product rows.

Product Sales Running Total
Laptop 10,000 10,000
Mobile 15,000 25,000
Tablet 20,000 45,000

6.3 Table (Across Then Down)

This option traverses the table horizontally first and then moves down to the next row according to the table's layout. It is useful for calculations that need to follow a two-dimensional table structure.

6.4 Table (Down Then Across)

This option traverses vertically first and then moves across to the next column. The result depends on the dimensions and layout of the visualization.

6.5 Pane (Across)

Pane (Across) calculates horizontally within each pane. A pane is a section of the view created by the arrangement of dimensions.

6.6 Pane (Down)

Pane (Down) calculates vertically within each pane. The calculation restarts according to the pane boundaries.

6.7 Pane-Based Traversal

Pane (Across Then Down) and Pane (Down Then Across), where available, define traversal within each pane in the selected order. They can be useful for complex tables that have multiple row and column dimensions.

6.8 Cell

Cell calculates within a single cell of the view. When a cell contains only one mark, some table calculations may have limited visible effect because there are no other marks in that cell to traverse.

6.9 Specific Dimensions

Specific Dimensions provides more precise control over addressing and partitioning. You select the dimensions Tableau should use to traverse the marks. Dimensions that are not selected are used as partitioning dimensions.

For example, selecting Month as an addressing dimension and leaving Year unselected allows a calculation to operate across months separately within each year.

Compute Using Option General Behavior Example Use
Table (Across) Moves horizontally through the table. Running total across years.
Table (Down) Moves vertically through the table. Running total down products.
Table (Across Then Down) Traverses across first, then down. Two-dimensional table calculation.
Table (Down Then Across) Traverses down first, then across. Two-dimensional table calculation.
Pane (Across) Moves horizontally within each pane. Compare periods within each pane.
Pane (Down) Moves vertically within each pane. Calculate totals within each pane.
Cell Calculates within a single cell. Cell-level table calculation behavior.
Specific Dimensions Lets you select the addressing dimensions directly. Rank products separately within each region.

7. How to Configure Compute Using

  1. Open Tableau Desktop or Tableau Cloud and open a worksheet.
  2. Create a visualization with the required dimensions and measures.
  3. Add a table calculation, such as Running Total, Rank, Percent of Total, or Index.
  4. Right-click the field containing the table calculation in the view or Marks card.
  5. Select Edit Table Calculation, or use the available Compute Using menu.
  6. Choose an option such as Table (Across), Table (Down), or Specific Dimensions.
  7. If you select Specific Dimensions, select the dimensions that should be used for addressing.
  8. Leave the other relevant dimensions unselected when they should define separate partitions.
  9. Review the highlighted marks or calculated results to confirm the direction and scope.
  10. Change the settings if the result does not match the intended analysis.

8. Practical Example: Running Total by Month and Region

Business Requirement: Calculate monthly running sales totals separately for each region.

Dataset

Region Month Sales
East January 10,000
East February 15,000
East March 20,000
West January 12,000
West February 18,000
West March 22,000

Steps

  1. Place Region on Rows.
  2. Place Month on Rows after Region, or use the layout appropriate for your analysis.
  3. Place Sales on Text.
  4. Add a Running Total table calculation to Sales.
  5. Choose Specific Dimensions.
  6. Select Month as the addressing dimension.
  7. Leave Region unselected so it partitions the calculation.
  8. Verify that the running total restarts for each region.

Expected Result

Region Month Sales Running Total
East January 10,000 10,000
East February 15,000 25,000
East March 20,000 45,000
West January 12,000 12,000
West February 18,000 30,000
West March 22,000 52,000

Explanation: Month defines the direction of calculation, while Region defines the groups in which the running total is calculated independently.

9. Addressing and Partitioning with Rank Calculations

Rank calculations can be configured to rank products across the entire view or separately within each region.

Rank Formula

RANK(SUM([Sales]))

Scenario A: Rank Products Across All Regions

Configure the calculation to address Product Name across the complete relevant view, without partitioning by Region. Each product mark is ranked within the full set of marks included in the calculation.

Scenario B: Rank Products Within Each Region

Configure Product Name as the addressing dimension and Region as a partitioning dimension. The ranking restarts within each region.

Region Product Sales Regional Rank
East Laptop 50,000 1
East Mobile 35,000 2
West Tablet 45,000 1
West Monitor 25,000 2

Key lesson: The rank formula can remain the same while the Compute Using configuration changes the meaning of the results.

10. Addressing and Partitioning with INDEX()

The INDEX() function returns the position of the current mark within the configured table calculation sequence.

Formula

INDEX()

Example: Number Products Within Each Region

Suppose the products are sorted by sales within each region. To number the products separately in each region, use INDEX() with Product Name as the addressing dimension and Region as the partitioning dimension.

Region Product Sales Index
East Laptop 50,000 1
East Mobile 35,000 2
East Tablet 20,000 3
West Tablet 45,000 1
West Monitor 25,000 2
West Keyboard 15,000 3

The index restarts at 1 for each region because each region is a separate partition.

11. Addressing and Partitioning with Percent of Total

Percent of Total shows how much each value contributes to a total. The selected addressing and partitioning settings determine which total is used as the denominator.

Formula

SUM([Sales]) / TOTAL(SUM([Sales]))

Format the calculated field as a percentage. The TOTAL() function is a table calculation, so its result depends on the marks included in the partition and the table calculation configuration.

Example: Percentage Within Each Region

Region Product Sales Percent of Regional Sales
East Laptop 60,000 60%
East Mobile 40,000 40%
West Tablet 30,000 30%
West Monitor 70,000 70%

For this example, the East total is 100,000 and the West total is 100,000. Each product's percentage is calculated relative to its region's total. Configure the table calculation so products are addressed and Region partitions the calculation.

12. Addressing and Partitioning with Difference Calculations

Difference calculations compare a value with another value in the table, often the previous mark. They are useful for month-over-month, year-over-year, and product-to-product comparisons.

Difference Formula

SUM([Sales]) - LOOKUP(SUM([Sales]), -1)

This formula subtracts the previous addressed mark's sales from the current mark's sales.

Percentage Difference Formula

IF LOOKUP(SUM([Sales]), -1) != 0
THEN
    (SUM([Sales]) - LOOKUP(SUM([Sales]), -1))
    / ABS(LOOKUP(SUM([Sales]), -1))
END

Format the result as a percentage. The absolute value in the denominator is a deliberate choice for measuring change relative to the magnitude of the previous value; for conventional percentage change, use the previous value itself as the denominator when its sign and interpretation are appropriate.

Addressing: The dimension that identifies the sequence being compared, such as Month.

Partitioning: The grouping dimension that determines where comparisons restart, such as Region or Year.

Important: The first mark in a partition has no previous mark, so the result is generally Null.

13. Specific Dimensions in Detail

Specific Dimensions offers direct control over which dimensions address the calculation. It is especially useful when a view has multiple dimensions on Rows, Columns, or the Marks card.

How to Use Specific Dimensions

  1. Right-click the measure containing the table calculation.
  2. Select Edit Table Calculation.
  3. Choose Specific Dimensions.
  4. Review the list of dimensions used in the view.
  5. Select the dimensions that should be used for addressing.
  6. Leave the other dimensions unselected when they should define partitions.
  7. If multiple addressing dimensions are selected, review additional options such as At the level or Restarting every when available.
  8. Check the output to ensure the calculation follows the intended order and restarts in the intended groups.

Example

A worksheet contains Year, Month, Region, and Sales. You want to calculate a monthly running total that restarts for each year and region.

Dimension Configuration Reason
Month Addressing Defines the sequence through which the running total moves.
Year Partitioning Restarts the calculation for each year.
Region Partitioning Restarts the calculation for each region.

The exact settings depend on the date level and worksheet structure. Confirm that the resulting table shows the intended restart behavior.

14. At the Level and Restarting Every

When Specific Dimensions is selected and more than one addressing dimension is selected, Tableau may expose additional controls for refining calculation behavior.

At the Level

At the level lets you specify the level of detail at which a calculation should operate or restart within a view. The available choices depend on the dimensions selected and the view's structure.

Restarting Every

Restarting every can be used with Specific Dimensions when multiple addressing dimensions are selected. It specifies a dimension at which the calculation restarts. This is useful when the calculation needs to traverse several dimensions but restart at a chosen level.

Example: If a calculation addresses Month and Quarter, you may configure it to restart at a chosen date level depending on the required analysis.

Note: These options are not available for every Compute Using configuration. Their availability depends on the selected table calculation settings.

15. Step-by-Step Practical Exercise: Monthly Running Total

Objective: Create a running total that moves through months and restarts each year.

Step 1: Connect to Data

Open Tableau and connect to Sample Superstore or another dataset containing Order Date and Sales.

Step 2: Create the View

  1. Drag Order Date to Columns and choose Year.
  2. Add Order Date to Rows and choose Month.
  3. Drag Sales to Text on the Marks card.
  4. Ensure the month and year arrangement is suitable for the intended comparison.

Step 3: Add Running Total

  1. Open the menu for the Sales measure in the view.
  2. Select Quick Table Calculation and choose Running Total, or use Add Table Calculation.
  3. Open Edit Table Calculation.
  4. Choose Specific Dimensions where necessary.
  5. Configure Month as the addressing dimension and Year as a partitioning dimension.

Step 4: Validate Results

Check that each month's running total includes the current month's sales and the sales of earlier months in the same partition. Verify that the total restarts when a new year begins.

16. Practical Exercise: Rank Products Within Categories

Objective: Rank products by sales separately within each product category.

Steps

  1. Drag Category and Product Name to Rows.
  2. Drag Sales to Text or Columns.
  3. Create a calculated field named Product Rank.
  4. Enter the formula:
RANK(SUM([Sales]))
  1. Add Product Rank to the view.
  2. Edit the table calculation.
  3. Set Product Name as the addressing dimension.
  4. Set Category as the partitioning dimension.
  5. Sort products by sales descending if the view should display the highest-performing products first.
  6. Verify that each category begins with rank 1.

17. Common Mistakes and Troubleshooting

Problem Possible Cause Solution
Running total does not restart for each year. Year is being used for addressing instead of partitioning, or the table calculation is configured incorrectly. Review Specific Dimensions and configure Year as a partitioning dimension where appropriate.
Rank is calculated across all regions. Region is not partitioning the calculation. Use Region as a partitioning dimension if the desired result is a separate ranking for each region.
Index restarts unexpectedly. The view contains additional partitioning dimensions. Review the dimensions selected under Compute Using.
Percentages total 100% across the whole view instead of within groups. The calculation uses a broader partition than intended. Configure the table calculation to calculate within the required groups.
Difference values appear in the wrong order. The addressing sequence or sort order is incorrect. Review the dimension used for addressing and the sort order.
Results change after adding a dimension. The added dimension changes the level of detail or table calculation structure. Review addressing, partitioning, and the marks in the view.
Table calculation results differ after filtering. Filtered-out marks may no longer be available to the table calculation. Review the filter behavior and whether the excluded marks need to remain in the calculation.
Table calculation returns Null for the first mark. The formula references a previous mark that does not exist in that partition. Check the first mark in each partition and handle Null results where needed.

18. Best Practices

  • Always identify the business question before selecting a Compute Using option.
  • Determine the desired calculation direction and grouping before configuring the worksheet.
  • Use Specific Dimensions when automatic table calculation settings do not produce the expected result.
  • Check the order of marks when working with INDEX(), LOOKUP(), running totals, or difference calculations.
  • Validate calculations with a small, readable text table before using them in a dashboard.
  • Use clear field names such as Monthly Running Total, Regional Rank, and Product Index.
  • When adding or removing dimensions, recheck the table calculation configuration.
  • Understand how filters affect the marks available to a table calculation.
  • Check whether the calculation should restart by year, region, category, or another dimension.
  • Do not assume that a formula alone determines the output; table calculation settings also matter.

19. Practice Questions with Answers

Question 1: What is addressing?

Answer: Addressing determines the dimensions along which Tableau moves when performing a table calculation.

Question 2: What is partitioning?

Answer: Partitioning defines groups in which a table calculation is evaluated separately.

Question 3: What is Compute Using?

Answer: Compute Using configures how Tableau uses the dimensions in the view to determine the direction and scope of a table calculation.

Question 4: You want a running total across months that restarts each year. What should you configure?

Answer: Use Month as the addressing dimension and Year as a partitioning dimension, then validate the result in the worksheet.

Question 5: How do you rank products separately for each region?

Answer: Use a rank formula such as RANK(SUM([Sales])), address Product Name, and partition by Region.

Question 6: Why does INDEX() restart at 1 for each category?

Answer: Category is likely configured as a partitioning dimension, so the index sequence restarts for each category.

Question 7: Which setting can provide more control over addressing dimensions?

Answer: Specific Dimensions allows you to select addressing dimensions directly and use the remaining dimensions as partitioning fields.

Question 8: Why can a table calculation change after adding a field to the view?

Answer: Adding a dimension can change the level of detail, mark arrangement, addressing, or partitioning of the calculation.

Question 9: What is the difference between Table (Down) and Pane (Down)?

Answer: Table (Down) traverses vertically through the table, restarting after partitions. Pane (Down) traverses vertically within each pane.

Question 10: How can you troubleshoot a running total that is not restarting?

Answer: Open Edit Table Calculation, review the addressing and partitioning dimensions, and verify that the desired restart dimension defines a separate partition.

20. Interview Questions and Answers

Q1. Explain addressing and partitioning with an example.

Answer: If sales are displayed by month and region, Month can be the addressing dimension and Region can be the partitioning dimension. Tableau calculates through months and performs the calculation separately for each region.

Q2. Can the same formula produce different results with different Compute Using settings?

Answer: Yes. Table calculations depend on the dimensions and marks in the view. Changing the direction or scope can change the results even if the formula remains unchanged.

Q3. What is Specific Dimensions used for?

Answer: It provides direct control over the dimensions used for addressing. The remaining dimensions are used for partitioning.

Q4. How do you calculate a running total separately for each product category?

Answer: Configure the sequence dimension as an addressing dimension and Category as a partitioning dimension. Apply the Running Total table calculation and verify that the total restarts for each category.

Q5. Why should you validate table calculations after adding dimensions?

Answer: Additional dimensions can change the level of detail, mark arrangement, and partitioning, which can change the result of the calculation.

Q6. What is the relationship between addressing and sorting?

Answer: Addressing determines the dimension through which Tableau calculates. Sorting determines the order of marks, which can affect sequence-dependent calculations such as running totals, index, and difference calculations.

21. Quick Revision Checklist

  • Addressing determines calculation direction.
  • Partitioning determines calculation groups.
  • Compute Using controls how Tableau traverses the marks.
  • Table (Across) calculates horizontally through the table.
  • Table (Down) calculates vertically through the table.
  • Pane options calculate within panes.
  • Specific Dimensions provides direct control over addressing fields.
  • Running totals can restart when a new partition begins.
  • Rank calculations can be configured globally or within groups.
  • INDEX() depends on the order of marks and partitioning.
  • Adding dimensions or changing filters can affect table calculation results.
  • Always validate results using a simple table before building a dashboard.

22. Conclusion

Addressing, partitioning, and Compute Using are fundamental concepts for mastering Tableau table calculations. Addressing determines the direction in which Tableau processes marks, partitioning determines the groups in which calculations run separately, and Compute Using helps configure both behaviors.

These concepts are important for building correct running totals, rankings, percentage-of-total calculations, index values, and difference analyses. Understanding them allows you to create more accurate reports and interactive dashboards.

Continue learning with JustAcademy Tableau Training or register for a Tableau Course Demo.

23. Official Learning References

whatsapp